#include <libcommon.h>
#include <libthe9.h>

int main(int argc, char *argv[])
{
    int res;

    if(argc != 2)
    {
        printf("Usage: %s user@mailbox\n", argv[0]);
        return(-1);
    }
    setenv("MAILFWD_ADDR", "pass9dev2:10030", 1); 

    if((res=send_mail(getenv("MAILFWD_ADDR"),
                        argv[1],
                        "webmaster@corp.the9.com",
                        "gm@corp.the9.com",
                        "测试", "测试")))
    {
        printf("send_mail fail, res:%d\n", res);
        return(-1);
    }
    printf("send_mail succeed\n");

    return(0);
}
